{% extends "base/base.html" %}
{% import "macro/display.html" as display -%}
{% block title %}{{ gettext("Production / Label Info For") }} {{ object.name|e }}{% endblock %}

{% block main %}
<h2><img class="icon_header" {% if object.label_icon %}src="{{ object.label_icon.url }}"{% else %}src="{{ STATIC_URL }}transmit_blue.png"{% endif %} alt="" />{{ gettext("Label / Production Information For") }} {{ object.name|e }} {% if user.is_staff %} [<a href="/admin/webview/label/{{ object.id }}/">{{ gettext("Edit Info") }}</a>]{% endif %}</h2>

<table>
<tr>
<td class="label_summary">
{% if object.logo %}<img class="label_logo" src="{{ object.logo.url }}" />{% else %}<img class="label_logo" src="{{ STATIC_URL }}no_picture.png" />{% endif %}
<br /><strong>{{ object.name|e }}</strong><br />
{% if object.found_date %}({{ gettext("Founded On") }}: {{ display.date(object.found_date) }})<br />{% endif %}
{% if object.cease_date %}{{ gettext("Shutdown Date") }}: {{ display.date(object.cease_date) }}<br />{% endif %}

{{ gettext("Links") }}:{% if object.webpage %} <a href="{{ object.webpage|e }}" target="_blank">{{ gettext("[Website]") }}</a>{% endif %}
{% if object.wiki_link %} <a href="{{ object.wiki_link|e }}" target="_blank">[Wiki]</a>{% endif %}
{% if object.hol_id %} <a href="http://hol.abime.net/hol_search.php?N_ref_developer={{ object.hol_id }}" target="_blank">[HOL]</a>{% endif %}
{% if object.pouetid %} <a href="http://www.pouet.net/groups.php?which={{ object.pouetid }}" target="_blank">[Pouet]</a>{% endif %}
<p>{{ display.links(object) }}</p>
<br />

{% if object.last_updated %}{{ gettext("Last Updated") }}: {{ display.date(object.last_updated) }}<br />{% endif %}
{% if object.created_by %}{{ gettext("Added By") }}: {% set U = object.created_by %}{% include "webview/t/user.html" %}<br />{% endif %}
</td>
<td class="label_description">
{% if object.info %}
<p><i>{{ object.info|urlize|bbcode|linebreaks }}</i></p>
{% endif %}<br />

{% if object.artist_set.count() != 0 %}
 <b>{{ gettext("Associated Artists") }}:</b><br />
 {% for artist in object.artist_set.all() %}
  {{ display.artist(artist) }}<br />
 {% endfor %}<br />
{% endif %}

{% if object.get_songs().count() != 0 %}
 <b>{{ gettext("Associated Songs") }}:</b><br />

 {% set objs, paging = dv.paginate(object.get_songs().all()) %}

 {% for song in objs %}
  {{ display.song(song) }} {{ gettext("by") }} {{ display.artists(song) }} {{ display.queue_song(song, user) }}<br />
 {% endfor %}<br />
{% endif %}
</td>
</tr>
</table>
{{ paging }}
{% endblock %}

